import HttpRequest from '../httpRequest'
import config from '../config'

export default class ApiModel {
  static getToken(code) {
    return HttpRequest.request(`${config.host}/weixin/code?code=${code}`, 'GET')
  }
  static uploadImg(data) {
    return HttpRequest.request(`${config.host}/user/upload`, data, 'POST')
  }
  static getUserMsg() {
    return HttpRequest.request(`${config.host}/user/userinfo`, 'GET')
  }
  static postUserEntry(data) {
    return HttpRequest.request(`${config.host}/user/entries`, data, 'POST')
  }
  static getNoteList() {
    return HttpRequest.request(`${config.host}/notice`, 'GET')
  }
  static setWxShare() {
    return HttpRequest.request(`${config.host}/weixin/share`, 'GET')
  }
}
